<!DOCTYPE html>
<html>
<head>
	<title>商品列表</title>
	<link rel="stylesheet" type="text/css" href="/static/css/list.css">
	<script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script>
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
  	<!-- <nav class="navbar navbar-default navbar-fixed-top">
	  <div class="container">
	    
	  </div>
	 </nav>
 -->
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">首页</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">商品列表</a></li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
<div class="container">
	<div class="row">
	<?php foreach ($data as $key => $value): ?>
	  <div class="col-sm-6 col-md-4">
	    <div class="thumbnail">
	      <img src="<?php echo $value['img'] ?>" alt="...">
	      <div class="caption">
	        <h3><?php echo $value['title'] ?></h3>
	        <p><?php echo $value['description'] ?></p>
	        <p><s>原价：<?php echo $value['price_normal'] ?></s></p>
	        <p>秒杀价：<?php echo $value['price_discount'] ?></p>
	        <p>剩余/库存：<?php echo $value['num_left'] . '/' . $value['num_total']?></p>
	        <p><a href="#" class="btn btn-primary" role="button">购 买</a> <a href="#" class="btn btn-default" role="button">加入购物车</a></p>
	      </div>
	    </div>
	  </div>
	 <?php endforeach; ?>
	</div>
</div>
<script type="text/javascript" src="/index.php/id">
	
</script>
</body>
</html>
